﻿namespace Snake.Scripts
{
    class Singleton<T> where T :class,new()
    {
        private static T instace;

        public static T Instance
        {
            get
            {
                if (instace == null)
                {
                    instace = new T();
                }
                return instace;
            }
        }
    }
}
